package com.example.demo.controller;

import com.example.demo.common.Result;
import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/finish")
public class FinishController {

    @Resource
    UserMapper userMapper;

    @PostMapping
    public Result<?> finish(@RequestBody User user) {
        userMapper.updateById(user);
        return Result.success(user);
    }
}
